import { _decorator, Component, director, game, Input, input, Prefab, sys } from 'cc';
import GlobalBoot from '../gameCore/global/GlobalBoot';
import StorageMgr from '../framework/manager/storageManager';
import ConfigGame from '../gameCore/global/ConfigGame';
const { ccclass, property } = _decorator;

@ccclass('Select')
export class select extends Component {

    @property([Prefab])
    public backPrefabs: Prefab[] = [];

    async start() {
        console.log("#" + this.node.name);
        this.checkChannel()
        await GlobalBoot.Instance.init();
    }


    update(deltaTime: number) {

    }

    checkChannel() {
        const channel_id = StorageMgr.get("channel_id", false)
        if (ConfigGame.Channel_id)
            StorageMgr.set("channel_id", ConfigGame.Channel_id);
        
        const channel_type = StorageMgr.get("channel_type", false)
        if (ConfigGame.Channel_type)
            StorageMgr.set("channel_type", ConfigGame.Channel_type);

    }

}


